home *** CD-ROM | disk | FTP | other *** search
- Path: news.kreonet.re.kr!usenet
- From: jwhahn@cair.kaist.ac.kr (Jung Hahn)
- Newsgroups: comp.lang.c++
- Subject: Re: LPCREATESTRUCT
- Date: Wed, 07 Feb 1996 11:46:18 GMT
- Organization: Applied Database Labs, K.A.I.S.T
- Message-ID: <311890b8.13412781@news.kreonet.re.kr>
- References: <4f8qum$cck@guitar.sound.net>
- NNTP-Posting-Host: swine.kaist.ac.kr
- X-Newsreader: Forte Agent .99d/32.168
-
- On Wed, 07 Feb 1996 14:13:43 GMT, chris@sound.net (chris) wrote:
-
- >I am unable to determine what lpcreatestruct in doing in the following
- >line of code. It is in a windows procedure, within the code that is
- >executed during the processing of the wm_create message.
- >
- >hInstance = ((LPCRETESTRUCT) lParam) -> hInstance;
- >
- >If you can point me in the right direction, I would appreciate it.
- >Also, do you know where I might find this in the online documentation
- >for the Borland Compiler (version 4.2).
- >
- >Thank You,
- >
- >chris@sound.net
- >
-
- Yeah ... You see lParam Has no definite type ....
-
- get what I mean ?
- hmm ... put it in another way .... You wanna use the lParam as a
- LPCRETE ETC structure so you type cast it to LPCRETESTRUCT...
- and use the hInstance member of that structure....
-
- here is an example.
-
- struct lalala {
- int i,j,k;
- char *lala;
- float flala;
- };
-
- #define LALALASIZE sizeof( struct lalala)
-
- char *Buffer;
-
- main()
- {
- int i, j, k;
- float f;
- Buffer = ( char *) malloc( LALALASIZE);
-
- /* Now you wanna use Buffer as a buffer to a lalala structure... ok?
- so you go like this */
-
- f = ((struct lalala)Buffer)->flala;
- i = ((struct lalala)Buffer)->i;
-
- /* ok ???
- It's better than doing something like this ....
- */
-
- i = Buffer[3]<<8+Buffer[2]<<16+Buffer[1]<<24+Buffer[0]<<32; ...
- .
- .
- .
- I cannot even guess for flala .. :)
- }
-
- good luck ...
-
- sorry I know nothing about windows programming ..:)
- ___________
-
- Name: Jung w. Hahn
- Elm: jwhahn@cair.kaist.ac.kr
- Phone: 042-869-2959
-